package old.day03;

public class Day03Exercise {
    public static void main(String[] args) {


             /*
        int year = 2000; //年份  //带数(2021,2020,2000)
        if((year%4==0 && year%100!=0) || year%400==0){
            System.out.println(year+"是闰年");
        }else{
            System.out.println(year+"是平年");
}

         */














        /*
        int a=11;//带数10，11
        if (a%2==0){
            System.out.println(a+"是偶数");
        }else {
            System.out.println(a+"是奇数");
        }
        System.out.println("继续执行");

         */













        /*
        double price=300.0;
        if (price>=200){
            price*=0.8;
        }
        System.out.println(price);//240

         */










        /*
        int num=9;//带数9，10
        if (num%2==0){
            System.out.println(num+"是偶数");
        }
        System.out.println("继续执行");

         */














        /*
        int a=5;
        int b=a>3?1:-1;
        System.out.println(b);//1
        int c=4,d=3;
        int max=c>d?c:d;
        System.out.println(max);//4

         */















        /*
        System.out.println(10+20+""+30);//3030
        System.out.println(10+""+20+30);//102030
        System.out.println(""+10+20+30);//102030
        System.out.println(10+20+30+"");//60

         */











        /*
        int age=22;
        System.out.println("age=");//age=
        System.out.println(age);//22
        System.out.println("age="+age);//age=22
        System.out.println("今年我"+age+"岁了");//今年我22岁了

         */
















        /*
        int a=5;
        a+=10;
        System.out.println(a);//15
        int b=5;
        b-=2;
        System.out.println(b);//3
        int c=10;
        c/=2;
        System.out.println(c);//5
        int d=9;
        d%=2;
        System.out.println(d);//1
        int e=3;
        e*=4;
        System.out.println(e);//12
        short s=4;
        s=(short) (s+10);
        System.out.println(s);//14

         */















        /*
        int a=5,b=10,c=5;
        boolean b1=a>b && c++>2;
        System.out.println(b1);//false
        System.out.println(c);//5,被短路
        boolean b2=a<b || c++>a;
        System.out.println(b2);//true
        System.out.println(c);//5,被短路

         */















        /*
        int a=5,b=10,c=5;
        System.out.println(a>b && b>c);//false
        System.out.println(a>b || b>c);//true
        System.out.println(a!=b && a==c);//true
        System.out.println(b!=c || a<c);//true
        boolean b1=!(a<b);
        System.out.println(b1);//false
        boolean b2=!(a!=c);
        System.out.println(b2);//true

         */





















        /*
        int a=4,b=8,c=4;
        boolean b1=b>a;
        System.out.println(b1);//true
        System.out.println(a==c);//true
        System.out.println(b<c);//false
        System.out.println(b!=a);//true
        System.out.println(a<=b);//true
        System.out.println(a>=b);//false
        System.out.println(a+c>b);//false
        System.out.println(a+c==b);//true
        System.out.println(b-a==c);//true

         */










        /*
        int a=5,b=10;
        a--;
        --b;
        System.out.println(a);//4
        System.out.println(b);//9
        int c=5,d=10;
        int e=c--;
        int f=--d;
        System.out.println(e);//5
        System.out.println(f);//9

         */









        /*
        int a=5,b=10;
        a++;
        ++b;
        System.out.println(a);//6
        System.out.println(b);//11
        int c=5,d=10;
        int e=c++;
        int f=++d;
        System.out.println(e);//5
        System.out.println(f);//11
        System.out.println(c);//6

         */








    }
        /*
        System.out.println(5%3);//2
        System.out.println(11%5);//1
        System.out.println(22%6);//4
    }

         */
}
